wpt_tmp->position.latitude.degrees = pdb_read4(&rec->latitude) / 10000000.0;
if (rec->year != 0xff) {
struct tm tm = {0};
- time_t tval;
tm.tm_min = rec->min;
tm.tm_hour = rec->hour;
static void
data_read(void)
{
- char name[9], desc[80];
+ char desc[80];
char *odesc = desc;
double lat,lon;
- char latdir, londir;
- long alt;
- char alttype;
- char icon[3] = {0};
waypoint *wpt_tmp;
while( fscanf(file_in, "%lf,%lf,%80[^\n]",
gpsutil_disp(waypoint *wpt)
{
double lon,lat;
- signed int ilon, ilat;
- const char *icon_token = "0";
- char tbuf[1024];
- char *tp = tbuf;
- time_t tm = wpt->creation_time;
lon = wpt->position.longitude.degrees;
lat = wpt->position.latitude.degrees;
void waypt_disp(waypoint *);
void fatal(const char *, ...);
ff_vecs_t *find_vec(char *);
+void disp_vecs(void);
+
void printposn(coord *c, int is_lat);
opdb->version = 0;
}
-
ff_vecs_t gpspilot_vecs = {
rd_init,
wr_init,
static void
data_write(void)
{
- int i, ct = waypt_count();
- struct hdr *htable, *bh;
+ int ct = waypt_count();
+ struct hdr *htable;
queue *elem, *tmp;
- extern queue waypt_head;
- waypoint *waypointp;
-abort();
if (NULL == (opdb = new_pdb())) {
fatal (MYNAME ": new_pdb failed\n");
mag_error = 1;
return;
}
- if (IS_TKN("$PMGNCMD,END") || is_file && feof(magfile_in)) {
+ if (IS_TKN("$PMGNCMD,END") || (is_file && (feof(magfile_in)))) {
found_done = 1;
return;
}
long l;
unsigned char uc[sizeof (long)];
} u;
- unsigned int i;
u.l = 1;
i_am_little_endian = u.uc[0];
#include <string.h>
+#include <ctype.h>
+#include <stdlib.h>
static const char vowels[] = "aeiouAEIOU";
char *
delete_last_vowel(int start, char *istring, int *replaced)
{
- int i,l;
- char *ostring;
+ int l;
/*
* Basically impelement strrchr.
char *tstring;
char *cp;
char *np;
- int i,j,l, nlen, replaced;
+ int i, l, nlen, replaced;
if (!ostring) {